import { defineStore } from "pinia";
import { ref } from "vue";
export const useGoodsStore = defineStore(
  "goods",
  () => {
    const test = ref("test Pinia");
    return {
      test,
    };
  },
  {
    //配置持久化
    persist: {
      storage: {
        setItem(key, value) {
          localStorage.setItem(key, value);
        },
        getItem(key) {
          return localStorage.getItem(key);
        },
      },
      paths: [],
    },
  }
);
